<?php
class Pageley_Tag_FormatDate extends Pageley_Tag_Abstract {
    
    private $value;
    private $format;
    
    public function execute() {
        $factory = Pageley_Controller_Session_Factory::getInstance();
        $session = $factory->getSession();
        $locale = $session->getLocale();
        setlocale(LC_TIME, $locale->getCode());
        return $this->value->format($this->format);
    }
    
    public function setValue($value) {
        $this->value = $value;
    }
    
    public function setFormat($format) {
        $this->format = $format;
    }
}